package cn.tedu.kcircle.content.front.infra.converter;

import cn.tedu.kcircle.content.dao.entity.ContentDO;
import cn.tedu.kcircle.content.front.repository.model.ContentAddModel;
import cn.tedu.kcircle.content.front.repository.model.ContentListItemModel;
import cn.tedu.kcircle.content.front.repository.model.ContentStandardModel;
import cn.tedu.kcircle.content.front.repository.model.ContentUpdateModel;
import cn.tedu.kcircle.content.front.service.bo.ContentStandardBO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class ContentConverter {
    public ContentDO model2DO(ContentAddModel contentAddModel){
        ContentDO contentDO = new ContentDO();
        BeanUtils.copyProperties(contentAddModel,contentDO);
        return contentDO;
    }
    public ContentDO model2DO(ContentUpdateModel contentUpdateModel){
        ContentDO contentDO = new ContentDO();
        BeanUtils.copyProperties(contentUpdateModel,contentDO);
        return contentDO;
    }

}
